﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DONGACS.Common;
using System.Data;

namespace DONGACS.DAO
{
    public class HoChieuDao : AccessData
    {
        public DataTable HoChieuHetHanSuDung(string tungay,string denngay)
        {
            CommandText = "sp_HoChieuHetHanSuDung";
            ParameterCollection = new string[] { "@tungay", "@denngay" };
            ValuesCollection = new object[] { tungay, tungay };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }

        public DataTable HoChieuconHetHanSuDung(string tungay, string denngay)
        {
            CommandText = "sp_HoChieuConHanSuDung";
            ParameterCollection = new string[] { "@tungay", "@denngay" };
            ValuesCollection = new object[] { tungay, tungay };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }
        public DataTable DanhSachNhanHoChieu(string tungay, string denngay, int LoaiHoChieu, int statusloc)
        {
            CommandText = "sp_DanhSachNhanHoChieu";
            ParameterCollection = new string[] { "@tungay", "@denngay", "@LoaiHoChieu", "@statusloc" };
            ValuesCollection = new object[] { tungay, tungay, LoaiHoChieu,statusloc };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }

        public DataTable DanhSachGiaoHoChieu(string tungay, string denngay, int LoaiHoChieu, int statusloc)
        {
            CommandText = "sp_DanhSachGiaoHoChieu";
            ParameterCollection = new string[] { "@tungay", "@denngay", "@LoaiHoChieu", "@statusloc" };
            ValuesCollection = new object[] { tungay, tungay, LoaiHoChieu, statusloc };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }

        public DataTable DanhSachChuaNopHoChieu(string tungay, string denngay, int LoaiHoChieu, int statusloc)
        {
            CommandText = "sp_DanhSachChuaNopHoChieu";
            ParameterCollection = new string[] { "@tungay", "@denngay", "@LoaiHoChieu", "@statusloc" };
            ValuesCollection = new object[] { tungay, tungay, LoaiHoChieu, statusloc };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }
        public DataTable DanhSachHoChieu7ngaychuanop()
        {
            CommandText = "sp_DanhSachHoChieu7ngaychuanop";
            ParameterCollection = new string[] { };
            ValuesCollection = new object[] { };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }
        public DataTable DanhSachHoChieu1NamHetHan()
        {
            CommandText = "sp_DanhSachHoChieu1NamHetHan";
            ParameterCollection = new string[] { };
            ValuesCollection = new object[] { };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }
        public DataTable DanhSachTongHoChieu()
        {
            CommandText = "sp_DanhSachTongHoChieu";
            ParameterCollection = new string[] { };
            ValuesCollection = new object[] { };
            Commandtype = CommandType.StoredProcedure;
            DataTable table = GetDataTable();
            return table;
        }
    }
}
